package com.hnit.care.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnit.care.entity.Drug;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liang
 * @since 2023-09-07
 */
@Mapper
public interface DrugMapper extends BaseMapper<Drug> {

    @Select("select * from elderlycare.drug where drug_name = #{drugName}")
    Drug selectdrug(String drugName);

    @Update("update elderlycare.drug set drug_num = #{drugnum} where drug_name = #{drugName} ")
    void updatecount(String drugName, int drugnum);
}
